# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-jaraco.envs
pkgver=2.4.0
_commit=71a4e633e7ba01a8baa1db0f03249faa83f5de98
pkgrel=4
pkgdesc="Classes for orchestrating Python (virtual) environments"
url="https://github.com/jaraco/jaraco.envs"
license=('MIT')
arch=('any')
depends=('python-path' 'python-virtualenv' 'python-tox')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest-enabler' 'python-pytest-mypy')
source=("git+https://github.com/jaraco/jaraco.envs.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd jaraco.envs
  python -m build -wn
}

check() {
  cd jaraco.envs
  python -m pytest
}

package() {
  cd jaraco.envs
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
